<template>
	<view>
	<view class="bgfff">
		<view class="  pad-lr-30">
			<view class="pad-tb-30 col-9 display-sb align-items fontSize-32 header">				
			<view class="width40 text-align-center">时间</view>
			<view class="width30 text-align-center">奖品</view>
			<view class="width20 text-align-center">状态</view>
			</view>
			
			<view class="pad-tb-30 display-sb align-items fontSize-28" v-for="item in list" :key="item.id">
				<view class="width40 text-align-center">{{item.create_time}}</view>
				<view class="width30 text-align-center">￥{{item.money}}</view>
				<view class="width20 text-align-center">{{item.status==1?'入帐钱包':''}}</view>
			</view>
		</view>
		
	</view>
	<view class="display-ce align-items flex-wrap mar-top-200" v-if="list.length==0">
				<image src="/static/img/icon10.png" class="proudct-item-icon-27" mode=""></image>
				<view class="mar-top-12 col-9 fontSize-30 text-align-center width-100">空空如也~~~</view>
			</view>
	</view>
</template>

<script lang="ts" setup>
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
import { ref } from 'vue';
import {prizeLog} from '../../utils/api'
onLoad(()=>{
	_prizeLog()
})
onReachBottom(()=>{
	if(page.value>1){
		_prizeLog()
	}
})
const page = ref(1)
const list = ref([])
const _prizeLog =() =>{
	prizeLog({page:page.value,limit:10}).then(res=>{
		if(res.code==1){
			list.value = list.value.concat(res.data.prize_log.data)
			if(res.data.prize_log.data.length>0){
				page.value++
			}
		}
	})
}
</script>

<style lang="scss">
@import 'record.scss';
</style>
